package com.lxit.video.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import com.lxit.video.bean.VideoInfo;
import com.lxit.video.dao.YJVideoInfoRepository;
import com.lxit.video.service.VideoInfoServiceYJ;

@Service
public class VideoInfoServiceImplYJ implements VideoInfoServiceYJ{

	@Autowired
	private YJVideoInfoRepository yJVideoInfoRepository;
	
	public List<VideoInfo> selectVideoTypeVideoInfo(Integer vTypeId){
		Pageable pageable = new PageRequest(0, 8);
		return yJVideoInfoRepository.selectVideoTypeVideoInfo(vTypeId,pageable);
	}

	@Override
	public List<VideoInfo> selectNewVideoInfo() {
		return yJVideoInfoRepository.selectNewVideoInfo();
	}
}